<div class="multiple-level" ng-if="$ctrl.showList.length">
  <div class="level-{{$ctrl.level+1}}" ng-repeat="item in $ctrl.showList">
    <div>
      <span ng-click="$ctrl.toggleShow($index,!$ctrl.showFlags[$index])">{{$ctrl.showFlags[$index]?'^':'v'}} </span>
      <span>{{item.key}}</span>
      <span>({{item.doc_count}})</span>
    </div>
    <multiple-level level="$ctrl.level+1" data="item" agg-fields="$ctrl.aggFields" ng-if="$ctrl.showFlags[$index]">
    </multiple-level>
  </div>
  <a ng-click="$ctrl.showMore()" ng-show="$ctrl.list.length > $ctrl.showNum">
    还有{{$ctrl.list.length - $ctrl.showNum}}项未展示，点击继续加载
  </a>
</div>
<div class="table-box" ng-if="$ctrl.tableData.length">
  <table cellspacing="0">
    <tr ng-repeat="t in $ctrl.tableData">
      <td ng-repeat="(key,value) in t._source">{{value}}</th>
    </tr>
</div>
</table>